<?php
namespace App;

use \Analog\Analog;
use App\Base;

class Logger
{
    private static $instance = null;
    public static function getInstance()
    {
        if (empty(self::$instance)) {
            $log_file = Base::project_path . '/' . date('Y-m-d') . '.log';
            $logger = new \Analog\Logger;
            $logger->handler (\Analog\Handler\File::init ($log_file));
            self::$instance = $logger;
        }
        return self::$instance;
    }

}